package org.easybuy.servlet;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.easybuy.dao.UserDao;
import org.easybuy.daoimpol.UserDaoimpol;
import org.easybuy.entity.BuyCar;
import org.easybuy.entity.User;
import org.easybuy.service.BuyCarService;
import org.easybuy.serviceimpol.BuyCarServiceImopl;

public class NumberServlet extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		this.doPost(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		UserDao user=new UserDaoimpol();
		HttpSession session = request.getSession();
		List<User> qwe=user.getAllEmail();
		session.setAttribute("Num", qwe);
		request.getRequestDispatcher("Index.jsp")
				.forward(request, response);
	}
	
	
	
	

}
